<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Script Error Test</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>

<body>
    <button id="btn-3000">3000</button>
    <div>
        <pre id="info"></pre>
    </div>
</body>
<script>
    window.addEventListener('error', evt => {
        const info = evt.error ? evt.error.stack : evt.message;
        document.querySelector('#info').textContent = info;
    });
</script>
<script src="./at3000.js"></script>

</html>